﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmallSoft.Language.Database
{
    public enum eDatabaseAccess {DA_FILESYSTEM,DA_DATABASE,DA_EXCELFILE};
    public class DatabaseAccessFactory
    {
        public static DatabaseAccessBase GetDatabaseAccess(eDatabaseAccess sourceType)
        {
            switch(sourceType)
            {
                case eDatabaseAccess.DA_FILESYSTEM:
                    return new FileSystemAccess();
                case eDatabaseAccess.DA_EXCELFILE:
                    return new ExcelDatabaseAccess();
                default: return null;
            }                        
        }
    }
}
